<!DOCTYPE html>
<html lang="en">
<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro" >
<head>

  <!-- SITE TITTLE -->
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>我有料</title>
  <meta name="description" content="我有料是篮球足球花钱料子的合买之地，在这里可以和不同的人进行合买来减少自己的压力。" />
  <meta name="keywords" content="我有料，足球，篮球，料子，合买，大神推荐" />
  
  <!-- PLUGINS CSS STYLE
  <link href="plugins/jquery-ui/jquery-ui.min.css" rel="stylesheet"> -->
  <!-- Bootstrap -->
  <link href="/plugins/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
  <!-- Font Awesome -->
  <link href="/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet">
  <!-- Owl Carousel -->
  <link href="/plugins/slick-carousel/slick/slick.css" rel="stylesheet">
  <link href="/plugins/slick-carousel/slick/slick-theme.css" rel="stylesheet">
  <!-- Fancy Box -->
  <link href="/plugins/fancybox/jquery.fancybox.pack.css" rel="stylesheet">
  <link href="/plugins/jquery-nice-select/css/nice-select.css" rel="stylesheet">
  <link href="/plugins/seiyria-bootstrap-slider/dist/css/bootstrap-slider.min.css" rel="stylesheet">
  <!-- CUSTOM CSS -->
  <link href="/css/style1.css" rel="stylesheet">

  <!-- FAVICON -->
  <link href="/img/favicon.png" rel="shortcut icon">

</head>
<style type="text/css">
list-right{padding-left: 20px;}

</style>
<body class="body-wrapper">

<section>
	<div class="container">
		<div class="row">
			<div class="col-md-12">
				<nav class="navbar navbar-expand-lg navigation">
					<a class="navbar-brand" href="index.html">
						<!-- <img src="images/logo.png" alt=""> -->
					</a>
					<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
					<span class="navbar-toggler-icon"></span>
					</button>
					<div class="collapse navbar-collapse" id="navbarSupportedContent">
						<ul class="navbar-nav ml-auto main-nav ">
							<li class="nav-item active">
								<a class="nav-link" href="/index">首页</a>
							</li>
							<li class="nav-item">
								<a class="nav-link" href="#">料大厅</a>
							</li>
							<li class="nav-item dropdown dropdown-slide">
								<a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
									待定 <span><i class="fa fa-angle-down"></i></span>
								</a>
								<!-- Dropdown list -->
								<div class="dropdown-menu dropdown-menu-right">
									<a class="dropdown-item" href="#">待定</a>
									<a class="dropdown-item" href="#">待定</a>
								</div>
							</li>
							<li class="nav-item dropdown dropdown-slide">
								<a class="nav-link dropdown-toggle" href="" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
									待定 <span><i class="fa fa-angle-down"></i></span>
								</a>
								<!-- Dropdown list -->
								<div class="dropdown-menu dropdown-menu-right">
									<a class="dropdown-item" href="#">待定</a>
									<a class="dropdown-item" href="#">待定</a>
								</div>
							</li>
						</ul>
						<ul class="navbar-nav ml-auto main-nav">
							<li class="nav-item dropdown dropdown-slide" id="usr">
								<a class="nav-link dropdown-toggle" href="" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
									<img src="/images/user-4.jpg"  class="layui-nav-img" style ='width: 45px;height: 45px;border-radius: 50%;'>
									<span id="userName" th:text="${user=='' ? '':user.userName}"></span>&nbsp;&nbsp;<i class="fa fa-angle-down"></i>
									<input id="userId" th:value="${user.id}" type="hidden">
								</a>
								<div class="dropdown-menu dropdown-menu-right">
									<a class="dropdown-item" href="#">个人中心</a>
									<a class="dropdown-item" href="javascript:;" onclick="logOut()">退出</a>
								</div>
							</li>
						</ul>
					</div>
				</nav>
			</div>
		</div>
	</div>
</section>
<!--==================================
=            User Profile            =
===================================-->
<section class="dashboard section" style="background: #F5F5F5">
	<!-- Container Start -->
	<div class="container">
		<!-- Row Start -->
		<div class="row">
			<div class="col-md-10 offset-md-1 col-lg-4 offset-lg-0">
				<div class="sidebar">
					<!-- User Widget -->
					<div class="widget user-dashboard-profile">
						<!-- User Image -->
						<div class="profile-thumb">
							<img src="/images/user-4.jpg" alt="" class="rounded-circle">
						</div>
						<!-- User Name -->
						<h5 class="text-center" th:text="${user=='' ? '':user.userName}"></h5>
						<p>
							<span><i class="fa fa-address-card-o icon-bg-4"></i>未认证</span>&nbsp;&nbsp;
							<span><i class="fa fa-credit-card icon-bg-4"></i>未认证</span>&nbsp;&nbsp;
							<span style="color:#3077ab;"><i class="fa fa-mobile-phone icon-bg-4"></i>已认证</span>&nbsp;&nbsp;
								<div class="dropdown-menu dropdown-menu-right">
									<a class="dropdown-item" href="#">待定</a>
									<a class="dropdown-item" href="#">待定</a>
								</div>
						</p>
						<p>
							账户余额：<i class="fa fa-yen icon-bg-4"></i><span>366.21</span>&nbsp;&nbsp;
							红包余额：<i class="fa fa-rmb icon-bg-4"></i><span>66.34</span>&nbsp;&nbsp;
						</p>
						<p>
							粉丝：<span>21</span>&nbsp;&nbsp;
							关注：<span>3</span>&nbsp;&nbsp;
						</p>
						<a href="#" class="btn btn-main-sm">充值</a>
						<a href="#" class="btn btn-main-sm">提款</a>
					</div>
					<!-- Dashboard Links -->
					<div class="widget user-dashboard-menu">
						<ul>
							<li ><a href=""><i class="fa fa-user"></i>我的合买</a></li>
							<li><a href="#" style="padding-left: 20px;font-size: 14px;" onclick="disContent('record')">合买记录<span>5</span></a></li>
							<li><a href="#" style="padding-left: 20px;">我的关注<span>12</span></a></li>
							<li><a href="#" style="padding-left: 20px;">账户明细<!-- <span>23</span></a> --></li>
							<li><a href=""><i class="fa fa-lock"></i>账户安全</a></li>
							<!-- <li><a href="" style="padding-left: 20px;">完善资料</a></li> -->
							<!-- <li><a href="" style="padding-left: 20px;">手机验证</a></li> -->
							<!-- <li><a href="" style="padding-left: 20px;">实名验证</a></li> -->
							<li><a href="javascript:;" style="padding-left: 20px;" onclick="disContent('drawing')">提款设置</a></li>
							
						</ul>
					</div>
				</div>
			</div>
			<div class="col-md-10 offset-md-1 col-lg-8 offset-lg-0">
				<!-- Recently Favorited -->
				<div class="widget dashboard-container my-adslist">
					<h3 class="widget-header" id="top_title">合买记录</h3>
					<!-- 暂无记录 -->
					<div style="display: none;" id="drawing">
						<div class="form-group">
							<label for="first-name">姓名(关乎到提款请认真填写,填写后不可修改)</label>
							<input type="text" class="form-control" th:value="${user.name}" id="name" placeholder="请填写支付宝实名">
						</div>
						<div class="form-group">
							<label for="first-name">支付宝账号(关乎到提款请认真填写,填写后不可修改)</label>
							<input type="text" class="form-control" th:value="${user.phoneNumber}" id="phoneNumber" placeholder="请填写支付宝账号">
						</div>
						<!-- <div class="form-group">
							<label for="first-name">提款密码(关乎到提款请认真填写,填写后不可修改)</label>
							<input type="number" class="form-control" th:value="${user.moneyPass}" id="moneyPass" placeholder="请填写提款密码最少四位">
						</div> -->
						<button class="btn btn-info" onclick="drawing()">保存</button>
					</div>
					<div id="record">
						<table class="table table-responsive product-dashboard-table">
							<thead>
								<tr>
									<th>类型</th>
									<th>信息</th>
									<th class="text-center">时间</th>
									<th class="text-center">操作</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									
									<td class="product-thumb">
										<i class="fa fa-soccer-ball-o fa-lg"></i>
									<td class="product-details">
										<a href="" >稳胆强人目前6连红想要合买速速点进来</a>
									</td>
									<td class="product-category"><span class="categories">2019-1-28</span></td>
									<td class="action" data-title="Action">
										<div class="">
											<ul class="list-inline justify-content-center">
												<li class="list-inline-item">
													<a class="delete" href="">
														<i class="fa fa-trash"></i>
													</a>
												</li>
											</ul>
										</div>
									</td>
								</tr>
								<tr>
									
									<td class="product-thumb">
										<i class="fa fa-soccer-ball-o fa-lg"></i>
									<td class="product-details">
										<a href="" >稳胆强人目前6连红想要合买速速点进来</a>
									</td>
									<td class="product-category"><span class="categories">2019-1-28</span></td>
									<td class="action" data-title="Action">
										<div class="">
											<ul class="list-inline justify-content-center">
												<li class="list-inline-item">
													<a class="delete" href="">
														<i class="fa fa-trash"></i>
													</a>
												</li>
											</ul>
										</div>
									</td>
								</tr>
								<tr>
									
									<td class="product-thumb">
										<i class="fa fa-soccer-ball-o fa-lg"></i>
									<td class="product-details">
										<a href="" >稳胆强人目前6连红想要合买速速点进来</a>
									</td>
									<td class="product-category"><span class="categories">2019-1-28</span></td>
									<td class="action" data-title="Action">
										<div class="">
											<ul class="list-inline justify-content-center">
												<li class="list-inline-item">
													<a class="delete" href="">
														<i class="fa fa-trash"></i>
													</a>
												</li>
											</ul>
										</div>
									</td>
								</tr>
								<tr>
									
									<td class="product-thumb">
										<i class="fa fa-dribbble fa-lg"></i>
									<td class="product-details">
										<a href="" >稳胆强人目前6连红想要合买速速点进来</a>
									</td>
									<td class="product-category"><span class="categories">2019-1-28</span></td>
									<td class="action" data-title="Action">
										<div class="">
											<ul class="list-inline justify-content-center">
												<li class="list-inline-item">
													<a class="delete" href="">
														<i class="fa fa-trash"></i>
													</a>
												</li>
											</ul>
										</div>
									</td>
								</tr>
								<tr>
									
									<td class="product-thumb">
										<i class="fa fa-futbol-o fa-lg"></i>
									<td class="product-details">
										<a href="" >稳胆强人目前6连红想要合买速速点进来</a>
									</td>
									<td class="product-category"><span class="categories">2019-1-28</span></td>
									<td class="action" data-title="Action">
										<div class="">
											<ul class="list-inline justify-content-center">
												<li class="list-inline-item">
													<a class="delete" href="">
														<i class="fa fa-trash"></i>
													</a>
												</li>
											</ul>
										</div>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>
		<!-- Row End -->
	</div>
	<!-- Container End -->
</section>
<!--============================
=            Footer            =
=============================-->

<footer class="footer section section-sm">
  <!-- Container Start -->
  <div class="container">
    <div class="row">
      <div class="col-lg-3 col-md-7 offset-md-1 offset-lg-0">
        <!-- About -->
        <div class="block about">
          <!-- footer logo -->
          <!-- description -->
          <p class="alt-color">网站只是初步建设，后期会有更好的内容呈现给大家，同事如果有什么建议可以给我们进行留言。如果采纳了您的意见，我们将会为您送上优惠服务。</p>
        </div>
      </div>
      <!-- Link list
      <div class="col-lg-2 offset-lg-1 col-md-3">
        <div class="block">
          <h4>Site Pages</h4>
          <ul>
            <li><a href="#">Boston</a></li>
            <li><a href="#">How It works</a></li>
          </ul>
        </div>
      </div> -->
      <!-- Link list
      <div class="col-lg-2 col-md-3 offset-md-1 offset-lg-0">
        <div class="block">
          <h4>Admin Pages</h4>
          <ul>
            <li><a href="#">Boston</a></li>
            <li><a href="#">How It works</a></li>
          </ul>
        </div>
      </div> -->
      <!-- Promotion -->
      <div class="col-lg-4 col-md-7">
        <!-- App promotion -->
        <div class="block-2 app-promotion">
          <a href="">
            <!-- Icon -->
            <img src="/images/footer/phone-icon.png" alt="mobile-icon">
          </a>
          <p>手机app及微信小程序敬请期待！</p>
        </div>
      </div>
    </div>
  </div>
  <!-- Container End -->
</footer>
<!-- JAVASCRIPTS -->
  <script src="/plugins/jquery/dist/jquery.min.js"></script>
  <!-- <script src="plugins/jquery-ui/jquery-ui.min.js"></script> -->
  <script src="/plugins/tether/js/tether.min.js"></script>
  <script src="/js/pingtu.min.js"></script>
  <script src="/plugins/raty/jquery.raty-fa.js"></script>
  <script src="/plugins/bootstrap/dist/js/popper.min.js"></script>
  <script src="/plugins/bootstrap/dist/js/bootstrap.min.js"></script>
  <script src="/plugins/seiyria-bootstrap-slider/dist/bootstrap-slider.min.js"></script>
  <script src="/plugins/slick-carousel/slick/slick.min.js"></script>
  <script src="/plugins/jquery-nice-select/js/jquery.nice-select.min.js"></script>
  <script src="/plugins/fancybox/jquery.fancybox.pack.js"></script>
  <script src="/plugins/smoothscroll/SmoothScroll.min.js"></script>
  
  <!-- <script src="js/scripts.js"></script> -->

</body>
<script>
$(function(){
	
});
function disContent(type){
	if(type=="drawing"){
		$("#drawing").show();
		$("#top_title").html("提款设置");
		
		$("#record").hide();
	}else if(type=="record"){
		$("#record").show();
		$("#top_title").html("合买记录");
		
		$("#drawing").hide();
	}
}
function drawing(){
	var name=$("#name").val();
	var phoneNumber=$("#phoneNumber").val();
	var moneyPass=$("#moneyPass").val();
	var id=$("#userId").val();
	var url="/system/org/user/update";
	jQuery.ajax({
        type:"post",
        async:false,
        url:url,
        dataType:"json",
        data:{id:id,name:name,phoneNumber:phoneNumber,moneyPass:moneyPass},
        success:function(data){
        	if(data.success==true){
        		window.location.reload();
        		$("#drawing").show();
        		$("#top_title").html("提款设置");
        		
        		$("#record").hide();
        	}else{
        		alert(data.msg);
        	}
        }
	});
}
function logOut(){
	location.href="/logout";
}
</script>
</html>